package com.atguigu.hash;

public class SQRTTest {
    public static void main(String[] args) {
        Integer[]arr={1,2,3,4,5,6,7,8};
        SQRTDecomposition<Integer>sqrt=new SQRTDecomposition<>(arr, Integer::sum);
        System.out.println(sqrt.queryRange(0, 3));
        SQRTDecomposition<Integer> sqrt2 = new SQRTDecomposition<>(arr, Math::max);
        System.out.println(sqrt2.queryRange(0,3));
    }
}
